<template>
    <div class="goodsdesc-container">
        <h3 class="goodsdesc-title">{{ goodsdesc.title}}</h3>
        <div class="goodsdesc-comment" v-html="goodsdesc.content"></div>
    </div>
</template>

<script>
    export default {
        name: "GoodsDesc",
        data(){
            return {
                id: this.$route.params.id,
                goodsdesc: {}
            }
        },
        created(){
            this.getGoodsDesc();
        },
        methods:{
            getGoodsDesc(){
                this.$axios.get("/api/goods/getdesc/"+ this.id).then(res => {
                    if( res.data.status === 0){
                        this.goodsdesc =  res.data.message[0]
                    }
                });
            }
        }
    }
</script>

<style lang="scss" scoped>
.goodsdesc-container {
    padding:10px;
    .goodsdesc-title {
        padding: 10px;
        font-size: 16px;
        color: #007aff;
        line-height: 24px;
        border-bottom: 1px solid #ccc;
    }
    .goodsdesc-comment {
        padding-top: 15px;
        font-size: 14px;
        line-height: 24px;
    }
}
</style>
